package xin.ryven.car.android.utils

import android.content.Context
import android.graphics.Typeface
import android.widget.TextView

object FontUtils {
    private var customFont: Typeface? = null
    
    fun init(context: Context) {
        if (customFont == null) {
            try {
                customFont = Typeface.createFromAsset(context.assets, "fonts/music.ttf")
            } catch (e: Exception) {
                e.printStackTrace()
            }
        }
    }
    
    fun apply(textView: TextView) {
        customFont?.let {
            textView.typeface = it
        }
    }
} 